package com.tianshuo.cascade.main;

import com.tianshuo.cascade.config.CascadeConfig;
import com.tianshuo.cascade.model.Child;
import com.tianshuo.cascade.model.Father;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class CascadeAnnotationApplicationContextTest {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext();
        applicationContext.register(CascadeConfig.class);
        applicationContext.refresh();

        applicationContext.getBean("child", Child.class);

        System.out.println(applicationContext.getBean("father", Father.class));
    }
}
